# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V33.Model.SiteCompanionSetting do
  @moduledoc """
  Companion Settings

  ## Attributes

  *   `companionsDisabled` (*type:* `boolean()`, *default:* `nil`) - Whether companions are disabled for this site template.
  *   `enabledSizes` (*type:* `list(GoogleApi.DFAReporting.V33.Model.Size.t)`, *default:* `nil`) - Allowlist of companion sizes to be served via this site template. Set this list to null or empty to serve all companion sizes.
  *   `imageOnly` (*type:* `boolean()`, *default:* `nil`) - Whether to serve only static images as companions.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "dfareporting#siteCompanionSetting".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :companionsDisabled => boolean() | nil,
          :enabledSizes => list(GoogleApi.DFAReporting.V33.Model.Size.t()) | nil,
          :imageOnly => boolean() | nil,
          :kind => String.t() | nil
        }

  field(:companionsDisabled)
  field(:enabledSizes, as: GoogleApi.DFAReporting.V33.Model.Size, type: :list)
  field(:imageOnly)
  field(:kind)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V33.Model.SiteCompanionSetting do
  def decode(value, options) do
    GoogleApi.DFAReporting.V33.Model.SiteCompanionSetting.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V33.Model.SiteCompanionSetting do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
